//
//  KKMessageItem.m
//  KKLiveDemo
//
//  Created by leo on 2017/7/29.
//  Copyright © 2017年 leo. All rights reserved.
//

#import "KKMessageItem.h"

@implementation KKMessageItem

- (instancetype)initWithMsg:(id)msg type:(KKMessageType)type {
    self = [super init];
    if (self) {
        self.msg = msg;
        self.type = type;
    }
    return self;
}

+ (instancetype)msgWithText:(NSString*)text {
    
    return [[KKMessageItem alloc] initWithMsg: text type: KKMessageType_Text];
}

+ (instancetype)msgWithImage:(UIImage *)image isOrignal:(BOOL)origal {
    
    return [[KKMessageItem alloc] initWithMsg: nil type: KKMessageType_Image];
}

+ (instancetype)msgWithDate:(NSDate*)timetips {
    
    return [[KKMessageItem alloc] initWithMsg: nil type: KKMessageType_TimeTip];
}

+ (instancetype)msgWithRevoked:(NSString *)sender {
    
    return [[KKMessageItem alloc] initWithMsg: nil type: KKMessageType_RevokedTips];
}

+ (instancetype)msgWithSound:(NSData *)data duration:(NSInteger)duration {
    
    return [[KKMessageItem alloc] initWithMsg: nil type: KKMessageType_Sound];
}

#pragma mark - Public methods

- (BOOL)isMineMsg {
    return true;
}
- (BOOL)isC2CMsg {
    return true;
}
- (BOOL)isGroupMsg {
    return true;
}


@end
